<template>
  <span>
    <img :src="image_url" />
  </span>
</template>

<script setup>
import { computed } from 'vue'
import api from '@/odoojs/index.js'

const props = defineProps(['node', 'formInfo'])

const image_url = computed(() => {
  const fname = props.node.name
  const { record = {} } = props.formInfo || {}
  const val = record[fname]
  if (val) {
    return `${api.baseURL}${val}`
  } else {
    return undefined
  }
})
</script>

<style type="text/css"></style>
